Active
Project:
SWF Tools
Version:
6.x-2.2
Component:
SWF Tools
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
9 Mar 2009 at 10:16 UTC
Updated:
28 Feb 2010 at 17:17 UTC
I've upgraded to SWF Tools 2.2 and installed Flowplayer 3. It works fine for local flv, but not for Youtube video.
Youtube video urls seems to be handled by "Default player for a list of mixed media:"
If I set this to JW Media Player 4 everything works fine, the Youtube video has image and sound, if I select Flowplayer 3 the player shows and spins but nothing happens.
Comments
Comment #1
Stuart Greenfield commentedWhat code / method are you using to embed the file? I've not tried YouTube via FlowPlayer yet. Can you put an example filter or php code and I'll try to recreate and test it.
YouTube content can be a little tricky as the paths do not (typically) include an extension, and this causes the SWF Tools autodection of the action to get confused. You can force a specific action using action="swftools_flv_display" (examples in the documentation). Does that get it working? That will tell SWF Tools to skip autodetection and assume the file is an flv video.
Comment #2
bjoped commentedThanks for a quick response. I use a simple straightforward method from the SWF tools documentation and a Monty Python movie:
swf file="http://www.youtube.com/watch?v=4vuW6tQ0218"
I've just copied the url from Youtube and this works fine with JW Media Player 4, I've done that with several Youtube movies. You're right concerning the extension, it does not show, so the format is actually unknown. I tried adding action="swftools_flv_display", but that did not work any better.
I'm running this on a new intranet we're building here at work, I use SWF tools to show social photos (image rotator) and flv movies and the users seem to love it.
Comment #3
Stuart Greenfield commentedOK, I've done some research and there is an issue with making the link, and then an issue with how to get SWF Tools to use it. I've got it working locally, so try the following...
First, YouTube try to mask link to their website - you need two values - the 'video_id' value and the 't' value. The 'video_id' is the one you have above as part of your existing link. The 't' value is a string of characters that you can find on the source page when viewing the video at YouTube. To get that you need to open the page on YouTube, view the source, and then find the values from inside
var swfArgs.So for your example Monty Python (good clip btw!), the 'video_id' is 4vuW6tQ0218 and the 't' value is vjVQa1PpcFP4ri3lXML2sWac8F5-7R0jAvQTLc0zXHE%3D.
The url for the movie you want is then http://www.youtube.com/get_video?video_id=4vuW6tQ0218&t=vjVQa1PpcFP4ri3l...
But if you put that in your filter it doesn't work and FlowPlayer3 throws an error.
Locally I'm using SWF Object 2 to embed, and what is happening is that the & gets encoded to \\x26amp;
BUT, if you replace the & with %26 that goes through with no further encoding and it works.
So, your finished filter, for your clip, would be
Note - we still have to tell SWF Tools to treat this url as a video stream as it cannot work it by itself.
Curiously, this string DOESN'T work with Wijering player, which wants the version of the filter you were trying!
Just to verify it, I tried another movie (here's the Numa Numa song...)
Try it out, and let me know if it works. It looks like the handbook page needs to be updated to reflect this if this solution is good.
Comment #4
jordanewert commentedI figured it out! All you have to do is go to the page source and then find "var embedUrl". Use that instead of the URL. Take this along with stuarts advice on the size and everything else.
Comment #5
rysan commentedHey Stuart, about FlowPlayer3, as you mentioned in other post, 't' value changes over time, and it is pretty frustrating, because yesterday it played the video and this morning it doesn't. I compared 't' value and it did change over the night. Is there any workaround for this or other way to use this player for Youtube video?
Comment #6
Stuart Greenfield commentedI've not tried using the embedUrl approach.
Other than that I don't think there's an easy way to do it. JW player provides a facility to embed YouTube via the yt.swf file. There are various discussions on the FlowPlayer forum, including a description of how to write a plug-in to enable it. (http://flowplayer.org/documentation/developer/writing-streaming-plugins....)
There is also a description at Adobe (http://www.adobe.com/devnet/devices/articles/youtube_fl3_video.html), but I've not really read it fully to take in what it means.
I think part of the issue is that YouTube are trying to make it difficult to play their content via other players, so the method is deliberately inconvenient!